package com.jinly.ryder.manage.dao.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.jinly.ryder.common.dao.entity.BaseDO;
import com.jinly.ryder.manage.service.model.DeployStatus;
import com.jinly.ryder.manage.service.model.EnvType;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 部署实例
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("app_instance")
public class AppInstanceDO extends BaseDO {
    /**
     * 实例ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 实例名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 应用名称
     */
    @TableField(value = "app_name", updateStrategy = FieldStrategy.NEVER)
    private String appName;

    /**
     * 环境类型
     */
    @TableField(value = "env_type")
    private EnvType envType;

    /**
     * 分组名称
     */
    @TableField(value = "deploy_group_name")
    private String deployGroupName;

    /**
     * 主机
     */
    @TableField(value = "host")
    private String host;

    /**
     * 端口
     */
    @TableField(value = "port")
    private Integer port;

    /**
     * 部署状态 待发布，发布中，发布成功，发布失败
     */
    @TableField(value = "deploy_status")
    private DeployStatus deployStatus;

}
